import { app } from "electron";
import path from "path";

export const mainWindowServer = (win, hash = "") => {
  // const isPro = app.isPackaged; //生产环境
  // let entryPath = (isPro?config.url:"http://localhost:8080")+(hash ? "#" + hash : hash);
  // win.loadURL(entryPath);
  const rootPath = app.getAppPath();
  const entryPath = path.join(rootPath,"web", "index.html");
  win.loadFile(entryPath);
};
